/*
*  Copyright 2019-2023 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.water.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import java.sql.Timestamp;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
* @description /
* @author Meorin
* @date 2024-11-11
**/
@Data
@TableName("water_quality_monitor")
public class WaterQualityMonitor implements Serializable {

    @TableId(value = "record_id", type = IdType.AUTO)
    @ApiModelProperty(value = "记录数据编号")
    private Integer recordId;

    @ApiModelProperty(value = "PH值")
    private Double ph;

    @ApiModelProperty(value = "水温")
    private Double temperature;

    @ApiModelProperty(value = "溶解氧含量")
    private Double dissolvedOxygen;

    @ApiModelProperty(value = "化学需氧量")
    private Double chemicalOxygenDemand;

    @ApiModelProperty(value = "氨氮含量")
    private Double ammoniaNitrogenContent;

    @ApiModelProperty(value = "记录时间")
    private Timestamp recordTime;

    public void copy(WaterQualityMonitor source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
